]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
2 years agost/bin: Delegate child allocation to layout manager
Florian Müllner [Wed, 6 Dec 2023 14:45:17 +0000 (15:45 +0100)]
st/bin: Delegate child allocation to layout manager

Since commit ed3b8d093e16, the actor's single-child policy is
enforced even when using the generic add/remove_child() methods.

This makes it possible to follow GTK/AdwBin's lead and replace
out custom child allocation with a BinLayout, without changing
the actor's semantics in a fundamental way.

However this does change slightly how the child is allocated, as
it now only expands according to its expand properties, not when
the alignment is set to FILL.

Even after the preparations in the previous commit, some fallout
is still likely, but it will be easy to address, and the cleanup
is significant enough to justify it.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3046>

2 years agojs: Explicitly set expand of St.Bin children
Florian Müllner [Wed, 6 Dec 2023 14:46:12 +0000 (15:46 +0100)]
js: Explicitly set expand of St.Bin children

Right now, St.Bin ignores the child's expand properties, and
instead expands the child if its alignment is set to FILL.

This will change when we replace the custom allocation code
with a layout manager, so to prepare for that, set the expand
property where needed to keep the expected behavior.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3046>

2 years agost/box-layout: Set layout manager type
Florian Müllner [Wed, 6 Dec 2023 14:20:56 +0000 (15:20 +0100)]
st/box-layout: Set layout manager type

Now that ClutterActor itself provides API to use a particular
layout manager type, we can use that instead of our own mechanism.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3046>

2 years agost/texture-cache: Drop bind_surface_property() method
Florian Müllner [Thu, 14 Dec 2023 20:46:12 +0000 (21:46 +0100)]
st/texture-cache: Drop bind_surface_property() method

It was only used for the fallback icon of X11 windows.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3056>

2 years agoshell/app: Remove X11-specific icon fallback
Florian Müllner [Thu, 14 Dec 2023 20:30:00 +0000 (21:30 +0100)]
shell/app: Remove X11-specific icon fallback

We have considered .desktop files a required app component for
more than 10 years now. It also has been several years that the
default session switched to wayland, which doesn't have protocol
for window icons.

So stop using an elaborate fallback path just for legacy clients,
and just fall back to the same generic icon we use for wayland
clients.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3056>

2 years agoscreenshot: Allow any enter key activate capture
Scott Buchanan [Fri, 26 May 2023 15:20:58 +0000 (16:20 +0100)]
screenshot: Allow any enter key activate capture

We currently only consider enter/return on the main keyboard
area, but not on the numpad.

Fix that.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6128

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2777>

2 years agostyle: Rewrote app grid tile drawing functions
Sam Hewitt [Tue, 14 Nov 2023 14:00:45 +0000 (10:30 -0330)]
style: Rewrote app grid tile drawing functions

- updated mixin for tile_button
- dropped the overview_button mixin
- minor changes to dash, appDisplay and switcherPopup JS to accommodate new stylesheet
- new focus style for all tile buttons
- improved high contrast style support for app grid and dash
- renamed some style-classes
- tidied up dash stylesheet

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3017>

2 years agoPass 'radius' to blur APIs instead of 'sigma'
Daniel van Vugt [Thu, 1 Jul 2021 08:03:57 +0000 (16:03 +0800)]
Pass 'radius' to blur APIs instead of 'sigma'

Requires mutter!1908 first.

So now consumers of the clutter blur code don't have to know the
implementation is Gaussian and no longer need to convert the intended
blur radius to a sigma value.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1905>

2 years agodocs: Fix st reference in urlmap
Florian Müllner [Thu, 14 Dec 2023 17:11:14 +0000 (18:11 +0100)]
docs: Fix st reference in urlmap

Whoops, no idea how that happened.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3055>

2 years agoci: Fix publishing docs
Florian Müllner [Thu, 14 Dec 2023 16:49:47 +0000 (17:49 +0100)]
ci: Fix publishing docs

The originally merge request predates the switch to `main` as
the default branch name (by a mere week!).

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3054>

2 years agoschema: Better describe always-show-log-out key
Cassidy James Blaede [Fri, 8 Dec 2023 21:37:13 +0000 (21:37 +0000)]
schema: Better describe always-show-log-out key

- The "user menu" was replaced with "system menu" years ago, so
  update the terminology in the summary and description
- Remove the full stop from the end of the summary for consistency
- More verbosely describe the behavior that's being overridden to
  reduce confusion

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3050>

2 years agoci: Build docs in CI
Zander Brown [Mon, 7 Jun 2021 00:10:28 +0000 (01:10 +0100)]
ci: Build docs in CI

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1873>

2 years agodoc: Switch documentation to gi-docgen
Zander Brown [Mon, 7 Jun 2021 00:04:55 +0000 (01:04 +0100)]
doc: Switch documentation to gi-docgen

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1873>

2 years agodbusService: Exempt org.gnome.Shell from sender tracking
Florian Müllner [Wed, 13 Dec 2023 00:11:52 +0000 (01:11 +0100)]
dbusService: Exempt org.gnome.Shell from sender tracking

If an interface has any signals, we don't want to auto-shutdown
while a caller is still connected to a signal.

Unfortunately we can't tell whether there are any signal connections,
so we track all callers instead, and keep the service alive while
any of them is still on the bus.

For services that we call from gnome-shell itself - like screencasts
or extensions - this has the unintended side effect of effectively
disabling auto-shutdown.

Address this by exempting the org.gnome.Shell name from sender
tracking.

Services that we expect to keep running for the lifetime of the
shell already disable auto-shutdown, so the only downside is a
small startup delay to resolve the well-known shell name.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7250

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3052>

2 years agoextensions-window: Add placeholder text to the search entry
Automeris naranja [Thu, 21 Sep 2023 19:47:59 +0000 (16:47 -0300)]
extensions-window: Add placeholder text to the search entry

"Text fields should have placeholder text or a label".

https://developer.gnome.org/hig/patterns/controls/text-fields.html

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>

2 years agoextensions-window: Add tooltips to headerbar buttons
Automeris naranja [Thu, 21 Sep 2023 19:46:06 +0000 (16:46 -0300)]
extensions-window: Add tooltips to headerbar buttons

"Controls in the header bars of primary windows should all have tooltips".

https://developer.gnome.org/hig/patterns/feedback/tooltips.html

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>

2 years agoextensions-window: Allow opening Main Menu with F10
Automeris naranja [Thu, 21 Sep 2023 19:43:54 +0000 (16:43 -0300)]
extensions-window: Allow opening Main Menu with F10

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2653>

2 years agowindowPreview: Don't hide overlay while hovering icon
Florian Müllner [Thu, 9 Nov 2023 23:08:18 +0000 (00:08 +0100)]
windowPreview: Don't hide overlay while hovering icon

We should treat the icon like we do the caption or close button,
and still consider the preview hovered when the pointer is over
the icon.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3049>

2 years agoextensions-app: Use banner instead of action bar
Florian Müllner [Thu, 7 Dec 2023 18:10:40 +0000 (19:10 +0100)]
extensions-app: Use banner instead of action bar

Action bars have largely gone out of fashion, and Banner is an
appropriate replacement in our case, so switch to that.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3048>

2 years agost/scroll-view: Allow removing edge fade
Julian Sparber [Thu, 7 Dec 2023 16:37:35 +0000 (17:37 +0100)]
st/scroll-view: Allow removing edge fade

Remove the fade effect when the css property `-st-vfade-offset` is removed
from a widget. The effect isn't added when the property never existed.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3047>

2 years agost/widget: Adjust to changes to get_transformed_paint_volume() in mutter
Sebastian Keller [Tue, 5 Dec 2023 21:10:04 +0000 (22:10 +0100)]
st/widget: Adjust to changes to get_transformed_paint_volume() in mutter

This method is now transfer full.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3045>

2 years agost/widget: Don't allow adding/removing "" style class
Sebastian Keller [Fri, 3 Nov 2023 09:07:42 +0000 (10:07 +0100)]
st/widget: Don't allow adding/removing "" style class

strstr() in find_class_name() will always consider "" a match so the
loop was not stopping at the end of the class_list. None of the matches
within the class_list would satisfy the return conditions, unless the
class_list was either an empty string as well or has a trailing space.
So this ends up with a match outside of the allocated string that
happens to satisfy these conditions by chance which then leads to the
class string containing some of this unrelated memory. Or it might lead
to a segfault.

This adds checks to the public API that uses find_class_name() to
prevent extensions from accidentally triggering a crash this way or
having some otherwise unexpected results.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7152
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3006>

2 years agost/bin: Fix height request
Florian Müllner [Tue, 5 Dec 2023 17:10:34 +0000 (18:10 +0100)]
st/bin: Fix height request

The request currently mixes up y-align and x-align.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3043>

2 years agostyle: Improve text scaling support
Sam Hewitt [Wed, 29 Nov 2023 17:48:59 +0000 (14:18 -0330)]
style: Improve text scaling support

- new drawing function to convert px to em, for select instances
- updated fontsize function to convert fonts in pt to em
- replace instances of discrete sizes with defined values
- fix instances where assets or icons did not scale along with text
- rework panel buttons to accommodate the scaling padding and icons
- new 'scalable' definitions for elements that follow text scaling

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3033>

2 years agodoc: Add README for toolbox tooling
Florian Müllner [Sat, 2 Dec 2023 00:30:39 +0000 (01:30 +0100)]
doc: Add README for toolbox tooling

Now that we have a collection of scripts around the toolbox
workflow, it makes sense to add a brief overview over the
available tools.

For now it's just located in the corresponding tools folder,
but it gives us something to point to once we overhaul the
toplevel documentation as part of the wiki migration.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3040>

2 years agotools: Remove outdated jhbuild setup script
Florian Müllner [Sat, 2 Dec 2023 00:42:17 +0000 (01:42 +0100)]
tools: Remove outdated jhbuild setup script

As useful as the custom jhbuild setup was at the time, it has been
superseded by jhbuild proper (which gained the ability to install
system dependencies since) or alternatives like containers.

Given that the script hasn't been meaningfully updated for almost
10 years, its list of dependencies is hopelessly outdated, and it's
therefore more likely to confuse newcomers than being of actual
help.

As much as I have fond memories of the script when starting out,
it's finally time to retire.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3040>

2 years agoextension-tool: Remove old compatibility code
Florian Müllner [Sun, 3 Dec 2023 11:20:47 +0000 (12:20 +0100)]
extension-tool: Remove old compatibility code

Since GNOME 44, extension schemas are compiled at install time.

At the time GNOME 46 is released, this will be all supported versions,
so start relying on it and drop the old compatibility
code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3042>

2 years agopopupMenu: Use less ambiguous symbols for radio options
Sam Hewitt [Thu, 23 Nov 2023 14:46:18 +0000 (11:16 -0330)]
popupMenu: Use less ambiguous symbols for radio options

- new checked and unchecked dot ornament assets
- updated JS with a NO_DOT ornament state, replaced instances of NONE with this

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3027>

2 years agotools/toolbox: Add run convenience script
Florian Müllner [Fri, 1 Sep 2023 02:18:32 +0000 (04:18 +0200)]
tools/toolbox: Add run convenience script

Wrapping the gnome-shell call with `dbus-run-session` is *mostly*
enough for testing, but not quite.

When running without gnome-session, the wayland display is not
propagated to the D-Bus daemon, so any app that is D-Bus activated
still opens in the host session.

This can be worked around by using a specific wayland-display name
and exporting it to the `dbus-run-session` environment up-front.

At this point the invocation is finicky enough to justify another
convenience script. This also gives us a place to expose some
useful features for testing, like forcing a right-to-left layout
or simulating the greeter.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>

2 years agotools/toolbox: Add build convenience script
Florian Müllner [Fri, 1 Sep 2023 01:55:43 +0000 (03:55 +0200)]
tools/toolbox: Add build convenience script

We don't require any build steps other than the standard meson
commands, but entering a toolbox and running 2-3 meson commands
still adds some friction.

Add a small convencience script that
 - finds the toplevel source directory (similar to `jhbuild make`)
 - enters the speficied toolbox (or the configured default)
 - automatically picks a build directory based on the toolbox name
 - builds and installs the project to /usr (inside the toolbox)

It also allows specifying meson -D options to change the build
configuration, and to optionally run `meson dist`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>

2 years agotools/toolbox: Set up first toolbox as default
Florian Müllner [Fri, 1 Sep 2023 12:33:24 +0000 (14:33 +0200)]
tools/toolbox: Set up first toolbox as default

Setting up more than one gnome-shell toolbox is uncommon, and users
shouldn't have to specify --set-default for other tools to pick the
right default.

It would be possible to detect the number of containers that were
created from the shell toolbox image, but the far easier option is
to just set up the first container as default.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>

2 years agotools/toolbox: Allow to set new toolbox as default for other tools
Florian Müllner [Fri, 1 Sep 2023 01:40:10 +0000 (03:40 +0200)]
tools/toolbox: Allow to set new toolbox as default for other tools

When specified, write out a small config file that can be sourced
by other scripts to pick the default toolbox container.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2935>

2 years agostyle: Don't clip scrolling folder icons until they touch the border
Daniel van Vugt [Mon, 27 Nov 2023 06:49:05 +0000 (14:49 +0800)]
style: Don't clip scrolling folder icons until they touch the border

In the absence of a fade-out it doesn't make sense to clip them sooner
than that.

So now we make the left and right padding equal to the border
("box-shadow") width and leave the top/bottom padding unchanged.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3031>

2 years agoextension-tool: Show "version-name" field if set
Florian Müllner [Thu, 30 Nov 2023 13:18:36 +0000 (14:18 +0100)]
extension-tool: Show "version-name" field if set

Now that both the website and the Extension app support the custom
"version-name" field, we should expose it in the CLI tool as well.

As a more developer-oriented tool, keep showing the automatic
version along-side the new field when both are set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3034>

2 years agoextensions-app: Support "version-name" metadata field
Aryan Kaushik [Fri, 27 Oct 2023 09:28:19 +0000 (14:58 +0530)]
extensions-app: Support "version-name" metadata field

The extensions site recently added support for a custom
"version-name" string in metadata:
gitlab.gnome.org/Infrastructure/extensions-web/-/merge_requests/154

This allows developers to control the version that is exposed to
users. As the version according to the developer is almost always
more relevant than the automatic version assigned by the website,
use it instead of the "version" field if set.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2995>

2 years agoUpdate Slovak translation
Dušan Kazik [Mon, 27 Nov 2023 13:43:08 +0000 (13:43 +0000)]
Update Slovak translation

(cherry picked from commit 5808dac61718f45604d3210fa6fb6b1789b37d14)

2 years agopadOsd: Fix rings and strips event handling
Peter Hutterer [Fri, 24 Nov 2023 03:16:12 +0000 (13:16 +1000)]
padOsd: Fix rings and strips event handling

    JS ERROR: TypeError: event.get_pad_event_details is not a function
    vfunc_captured_event@resource:///org/gnome/shell/ui/padOsd.js:824:53
    @resource:///org/gnome/shell/ui/init.js:21:20

These were renamed in mutter@97213041e8e7

Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7210

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3029>

2 years agostyle: Fix oversights in screenshot UI css for high contrast
Sam Hewitt [Fri, 24 Nov 2023 14:35:28 +0000 (11:05 -0330)]
style: Fix oversights in screenshot UI css for high contrast

- fix non-working is_highcontrast if statements in drawing
- add missing hc bits for screenshot UI elements

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3030>

2 years agoUse dedicated assets for ctrlAltTab
Sam Hewitt [Wed, 15 Nov 2023 15:02:27 +0000 (11:32 -0330)]
Use dedicated assets for ctrlAltTab

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3019>

2 years agodbusServices/extensions: Only show dialog when loaded
Florian Müllner [Tue, 21 Nov 2023 12:28:30 +0000 (13:28 +0100)]
dbusServices/extensions: Only show dialog when loaded

After the port to ESM, an extension's `prefs.js` file is imported
asynchronously. An unintended side effect of that is that we now
show the dialog before anything can be added to the window (either
by the extension, or the fallback error UI).

The delay almost always won't be noticeable to users, but it's
bad practice and prevents extensions from using some API that
only works before the window is realized.

To address the issue, add a `loaded` signal to the dialog that allows
the caller to postpone showing the window until the UI is ready.

Close: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7201
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3025>

2 years agomain: Instantiate EndSessionDialog
Charles Wong [Sat, 28 Oct 2023 07:34:36 +0000 (15:34 +0800)]
main: Instantiate EndSessionDialog

Using an exported `init()` function to create the object is an odd
pattern, and not having the object referenced anywhere makes it harder
to access for debugging or extensions.

Just export the `EndSessionDialog` class and instantiate it like we
do for other objects.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2997>

2 years agostyle: Stop setting slider height
Florian Müllner [Thu, 26 Oct 2023 16:56:17 +0000 (18:56 +0200)]
style: Stop setting slider height

Now that the slider requests a correct height, it is no longer
necessary to set it explicitly from the stylesheet.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

2 years agoslider: Request a size
Florian Müllner [Thu, 26 Oct 2023 11:39:38 +0000 (13:39 +0200)]
slider: Request a size

Sliders (and level bars) currently don't request any size, so it's
up to the caller (or stylesheet) to explicitly set a size big
enough to fit the bar/handle.

That's rather unexpected, we should request the size we need ourselves.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7133

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

2 years agoslider: Cache custom style properties
Florian Müllner [Thu, 26 Oct 2023 18:09:23 +0000 (20:09 +0200)]
slider: Cache custom style properties

Custom properties are not cached by the theme node itself, so
looking them up repeatedly at every repaint is relatively
expensive.

Avoid this by caching the values ourselves at style changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

2 years agobarLevel: Cache custom style properties
Florian Müllner [Thu, 26 Oct 2023 17:37:36 +0000 (19:37 +0200)]
barLevel: Cache custom style properties

Custom properties are not cached by the theme node itself, so
looking them up repeatedly at every repaint is relatively
expensive.

Avoid this by caching the values ourselves at style changes.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

2 years agobarLevel: Stop capping border-width at 1 pixel
Florian Müllner [Thu, 26 Oct 2023 13:17:45 +0000 (15:17 +0200)]
barLevel: Stop capping border-width at 1 pixel

I can't think of a reason why limiting the border to a maximum
would make any sense.

The original intention was probably to set a minimum border width
to avoid having to deal with border/no-border complexity in the code,
but as cairo accepts a line width of 0, it just works.

However limiting the size to the overall height seems reasonable,
as at that size a bigger height and different fill color can
achieve the same effect without requires special handling of
other values like the radius.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2994>

2 years agostatus/volume: Always look up device objects
Florian Müllner [Wed, 8 Nov 2023 18:41:18 +0000 (19:41 +0100)]
status/volume: Always look up device objects

Gvc may clean its device cache after we set up the device menu,
which can lead to failed assertions when using the "old" object
to later switch the device from a callback.

Make sure this doesn't happen by looking up the ID again from
the callback.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7173
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3011>

2 years agost/viewport: Set adjustment properties all at once
Julian Sparber [Tue, 21 Nov 2023 10:29:46 +0000 (11:29 +0100)]
st/viewport: Set adjustment properties all at once

This ensures that that property changes are notified all at the same
time and only after all were set. If we notify too early handlers
may act on a "broken" viewport.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3023>

2 years agost/adjustment: Ensure changed signal emission is compressed
Julian Sparber [Tue, 21 Nov 2023 10:20:06 +0000 (11:20 +0100)]
st/adjustment: Ensure changed signal emission is compressed

The docs say that `st_adjustment_set_values()` emits the `changed`
signal only once but it's actually emitted for each changed property,
this uses the `dispatch_properties_changed` vfunc to emit the `changed`
signal only per call to `st_adjustment_set_values()`. As a positive
side effect this also makes it possible to use `g_object_freeze/thaw_notify`
to compress the `changed` signal emission when using the setters for
properties.

This also fixes the wrong emission of the `changed` signal in
`st_adjustment_set_values()` when only the `value` property is changed.

Side note: the code is heavily inspired by GtkAdjustment

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3023>

2 years agoUpdate Turkish translation
Sabri Ünal [Mon, 20 Nov 2023 02:24:50 +0000 (02:24 +0000)]
Update Turkish translation

2 years agoshellDBus: Await Eval() result
Florian Müllner [Fri, 17 Nov 2023 17:31:32 +0000 (18:31 +0100)]
shellDBus: Await Eval() result

The Eval() method currently evaluates the provided string, and
returns the result immediately. This isn't useful when a promise
is returned, which has become much more likely now that accessing
any module requires import().

Simply await the result, to handle both sync and async code.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3021>

2 years agojs: Rely on default scroll policy where appropriate
Florian Müllner [Wed, 15 Nov 2023 13:54:18 +0000 (14:54 +0100)]
js: Rely on default scroll policy where appropriate

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>

2 years agost/scroll-view: Change default hscrollbar-policy
Florian Müllner [Wed, 15 Nov 2023 13:41:07 +0000 (14:41 +0100)]
st/scroll-view: Change default hscrollbar-policy

It is a bit odd to have different default values for the vertical
and horizontal policy, but then that's what we almost always want in
practice: Automatic scrolling vertically, and no scrolling horizontally.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>

2 years agost/scroll-view: Deprecate {v,h}scroll properties
Florian Müllner [Wed, 15 Nov 2023 12:53:38 +0000 (13:53 +0100)]
st/scroll-view: Deprecate {v,h}scroll properties

We have better replacements now, so we'll eventually want to stop
exposing the internal scroll bar children.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>

2 years agojs: Stop using {v,h}scroll properties
Florian Müllner [Wed, 15 Nov 2023 13:31:37 +0000 (14:31 +0100)]
js: Stop using {v,h}scroll properties

We only use them to access the corresponding adjustments, and
ScrollView now exposes those directly.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>

2 years agost/scroll-view-fade: Stop using {v,h}scroll properties
Florian Müllner [Wed, 15 Nov 2023 13:00:54 +0000 (14:00 +0100)]
st/scroll-view-fade: Stop using {v,h}scroll properties

They are internal children of the scroll view. Instead, switch to
the dedicated APIs for accessing the adjustments directly and query
the bar offsets.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>

2 years agost/scroll-view: Add private API to query bar offsets
Florian Müllner [Wed, 15 Nov 2023 14:06:33 +0000 (15:06 +0100)]
st/scroll-view: Add private API to query bar offsets

The scroll fade effect is the only component that accesses the
{v,h}scroll properties for anything other than getting access
to the corresponding adjustments.

Allow the effect to get what it needs via new private API instead,
so we can deprecate and eventually remove the scroll bar properties.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>

2 years agost/scroll-view: Expose adjustments as properties
Florian Müllner [Wed, 15 Nov 2023 12:50:42 +0000 (13:50 +0100)]
st/scroll-view: Expose adjustments as properties

The adjustments are currently only accessible indirectly via
the scroll bars. It is a bit odd to expose internal children,
and as nearly all users only access them for the adjustments,
it makes sense to expose those instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>

2 years agolookingGlass: Don't hide scroll bar manually
Florian Müllner [Wed, 15 Nov 2023 12:43:24 +0000 (13:43 +0100)]
lookingGlass: Don't hide scroll bar manually

The code predates the policy properties, which provide a cleaner
way of achieving the desired behavior.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3020>

2 years agost/scroll-view: Hide scroll bar from layout when its hidden
Jonas Dreßler [Wed, 16 Feb 2022 15:16:49 +0000 (16:16 +0100)]
st/scroll-view: Hide scroll bar from layout when its hidden

We hide scrollbars with POLICY_AUTOMATIC when the content of the scroll
view fits completely inside the view without having to scroll. In this case
it seems like a good idea to give the content the full available size
without subtracting scroll bars from that size.

So subtract the scroll bar from the size we give to the child only when
the scroll bar is actually visible, when it's invisible subtract 0 instead.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2190>

2 years agost/scroll-view: Allocate the scrollbars 0-size instead of not painting them
Jonas Dreßler [Tue, 1 Aug 2023 18:35:28 +0000 (20:35 +0200)]
st/scroll-view: Allocate the scrollbars 0-size instead of not painting them

StScrollView applies the policy of whether to show or hide the scroll
bar,
and with the AUTOMATIC policy the scroll bar should be hidden as soon as
the
content of the scroll view is small enough to fit without scrolling.

Now we only know about the final size of the content when we're inside
st_scroll_view_allocate(), so that's where we can decide whether the
scroll
bar should be visible or not. Clutter really doesn't like calling
clutter_actor_show/hide() in the middle of an allocation cycle though,
so
what we do instead is saving the state into priv->vscrollbar_visible,
and
then just not painting the scroll bar based on that in a paint() vfunc
override.

This approach is not great for several reasons, it means we also have to
override pick() and finally it means the paint volume of the scroll bar
is
incorrect.

While the greatest solution to this would be to just hide/show the
scroll
bar inside the allocate() function as it is possible in gtk, we have an
established pattern for this kind of case too: We usually allocate a
0-sized
rect for the thing we want to hide, so let's do that instead.

A nice side effect is that we can conveniently drop another paint() and
pick() vfunc override.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2190>

2 years agomain: Move g_setenv() calls before calls that may start threads
Sebastian Keller [Wed, 15 Nov 2023 09:21:35 +0000 (10:21 +0100)]
main: Move g_setenv() calls before calls that may start threads

setenv() is not thread-safe and must happen before starting threads. The
g_setenv() calls in main() happened after meta_context_configure(),
which will start a thread via meta_profiler_new() which in its init
calls g_bus_get().

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/6974
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3018>

2 years agoiconGrid: Use class handlers for ::child-{added,removed}
Zander Brown [Thu, 9 Nov 2023 15:44:00 +0000 (15:44 +0000)]
iconGrid: Use class handlers for ::child-{added,removed}

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3014>

2 years agost/bin: Use class handlers for ::child-{added,removed}
Zander Brown [Thu, 9 Nov 2023 15:45:29 +0000 (15:45 +0000)]
st/bin: Use class handlers for ::child-{added,removed}

Now these signals are directly on ClutterActor, we can use class handlers
instead

Note we don't make the same change to StScrollView as it would clash
with the internal children.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3014>

2 years agost/scroll-view: Adapt for ::child-{added,removed}
Zander Brown [Tue, 14 Nov 2023 10:54:16 +0000 (10:54 +0000)]
st/scroll-view: Adapt for ::child-{added,removed}

These were previously known as ::actor-{added,removed}

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3014>

2 years agojs: Adapt for ::child-{added,removed}
Zander Brown [Tue, 14 Nov 2023 10:52:53 +0000 (10:52 +0000)]
js: Adapt for ::child-{added,removed}

These were previously known as ::actor-{added,removed}

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3014>

2 years agost: Adapt for ClutterContainer removal
Zander Brown [Thu, 9 Nov 2023 15:45:00 +0000 (15:45 +0000)]
st: Adapt for ClutterContainer removal

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3014>

2 years agoshell/window-preview-layout: Adapt for ClutterContainer removal
Zander Brown [Thu, 9 Nov 2023 15:45:00 +0000 (15:45 +0000)]
shell/window-preview-layout: Adapt for ClutterContainer removal

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3014>

2 years agostyle: Improved monitor label osd
Sam Hewitt [Mon, 13 Nov 2023 18:34:26 +0000 (15:04 -0330)]
style: Improved monitor label osd

- drops OSD style for blue
- fixes #7140

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3016>

2 years agosearchController: Use ClutterText::cursor_position instead of position
Sebastian Keller [Sat, 11 Nov 2023 21:36:02 +0000 (22:36 +0100)]
searchController: Use ClutterText::cursor_position instead of position

The deprecated position property has been removed in mutter commit
31849868 in favor of the otherwise identical cursor_position property.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7186
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3015>

2 years agoUpdate Vietnamese translation
Ngọc Quân Trần [Sat, 11 Nov 2023 06:59:07 +0000 (06:59 +0000)]
Update Vietnamese translation

2 years agoUpdate Vietnamese translation
Ngọc Quân Trần [Sat, 11 Nov 2023 06:48:00 +0000 (06:48 +0000)]
Update Vietnamese translation

(cherry picked from commit cf682750c36fcbe4dad774fd016882b00c7ad1ad)

2 years agojs: Cleanup use of StBin
Zander Brown [Wed, 8 Nov 2023 10:20:03 +0000 (10:20 +0000)]
js: Cleanup use of StBin

StBins (inc StButton) should have their content managed via :child
rather than add_child()

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>

2 years agojs: Cleanup usage of StScrollView
Zander Brown [Tue, 7 Nov 2023 10:47:14 +0000 (10:47 +0000)]
js: Cleanup usage of StScrollView

Whilst you *can* use add_actor() with ScrollView, it's more idiomatic to
work on :child

Cleanup a few extras along the way

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>

2 years agoenvironment: Stop patching StBoxLayout
Zander Brown [Thu, 9 Nov 2023 08:09:30 +0000 (08:09 +0000)]
environment: Stop patching StBoxLayout

Child properties are long gone, and add() can be directly replaced with
add_child()

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>

2 years agojs: Stop using ClutterContainer API
Zander Brown [Tue, 7 Nov 2023 10:47:14 +0000 (10:47 +0000)]
js: Stop using ClutterContainer API

These have been long deprecated over in clutter, and (via several
vtables) simply forward the call to the equivalent ClutterActor methods

Save ourselves the hassle and just use ClutterActor methods directly

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>

2 years agost/bin: Stop implementing a ClutterContainer
Zander Brown [Wed, 8 Nov 2023 07:57:27 +0000 (07:57 +0000)]
st/bin: Stop implementing a ClutterContainer

Instead we react to ::actor-{added,removed} and delegate to ClutterActor

Code should still interact with :child rather than {add,remove)_child(),
but at least we now avoid the footgun where the different APIs did
different things

Fix: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3172
Fix: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2661
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>

2 years agoscreenshot: Don't abuse StButton
Zander Brown [Wed, 8 Nov 2023 10:50:02 +0000 (10:50 +0000)]
screenshot: Don't abuse StButton

It's an StBin, so can only have one child, yet we are adding multiple —
something we get away with by overriding allocate

Instead of doing that, move the content to it's own actor

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>

2 years agost/scroll-view: Stop implementing ClutterContainer
Zander Brown [Wed, 8 Nov 2023 07:36:30 +0000 (07:36 +0000)]
st/scroll-view: Stop implementing ClutterContainer

Instead, listen to ::actor-{added,removed} allowing ClutterActor's
regular add/remove API to work as expected — at least so long only one
child is added

We also no longer inherit StBin as we actually have up to three
children (including the two scrollbars), but by implementing :child
ourselves the API seen by JS is unchanged

Fix: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/2661
Fix: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3172
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3010>

2 years agost: Adjust to ClutterBinAlignment removal
Florian Müllner [Thu, 9 Nov 2023 23:08:24 +0000 (00:08 +0100)]
st: Adjust to ClutterBinAlignment removal

The custom alignment property was removed, so the convenience
constructor lost the corresponding parameters.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3013>

3 years agokeyboard: Fix backspace not getting released after deleting preedit
Sebastian Keller [Wed, 8 Nov 2023 09:46:52 +0000 (10:46 +0100)]
keyboard: Fix backspace not getting released after deleting preedit

When deleting is toggled while a preedit string is present, this causes
_toggleDelete() to use keyvalPress(). After the entire preedit string
has been deleted, _toggleDelete() will no longer hit the code path that
would call keyvalRelease() due to hasPreedit() now being false.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7171
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3009>

3 years agost/texture-cache: Always close GdkPixbufLoader before disposal
Barnabás Pőcze [Sun, 5 Nov 2023 01:49:34 +0000 (02:49 +0100)]
st/texture-cache: Always close GdkPixbufLoader before disposal

As per the warning emitted when destroying without closing first

  GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed.
  You must explicitly end the data stream to the loader before dropping the last reference.

closing it is necessary.

Create the GdkPixbufLoader after loading the file contents so that
the loader is guaranteed to be closed before it is destroyed.
(`gdk_pixbuf_loader_write()` closes it on failure.)

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3008>

3 years agonetworkAgent: Fetch environment from launch context before spawn_async()
Carlos Garnacho [Thu, 26 Oct 2023 14:04:46 +0000 (16:04 +0200)]
networkAgent: Fetch environment from launch context before spawn_async()

This will fetch the right environment for the launched application,
without using GNOME Shell's environment.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2993>

3 years agomisc: Fetch environment from launch context before spawn_async()
Carlos Garnacho [Thu, 26 Oct 2023 14:03:44 +0000 (16:03 +0200)]
misc: Fetch environment from launch context before spawn_async()

This will fetch the right environment for the launched application,
without using GNOME Shell's environment.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2993>

3 years agosearch: Allow grid using search providers to specify maximum of results
Sebastian Keller [Wed, 1 Nov 2023 17:15:22 +0000 (18:15 +0100)]
search: Allow grid using search providers to specify maximum of results

When GridSearchResults::_getMaxDisplayedResults() is called after the
first character has been entered in the search, GridSearchResults has
no children yet. _getMaxDisplayedResults() tries to determine the
maximum number of search results based on how often the largest child
would fit into the allocated size or -1 (i.e. no limit) if there are no
children. So for the initial search there is no limit and in the app
search all matching apps get added as possible results, which due to the
search term being only a single character is almost all installed apps.
This now causes allocation to be run for all these results, despite the
vast majority of them never being visible, which on slower machines can
cause noticeable delays before the search results are displayed.

This now adds the ability for search providers to specify a maximum
number of results that gets used instead of -1 when specified. By being
provider specific this means extensions implementing their own providers
will not be affected by this.

Further this sets the maximum for the app search provider to 6 as per
the current designs.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7155
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3004>

3 years agopopupMenu: Only connect to notify::key-focus when needed
Sebastian Keller [Mon, 30 Oct 2023 10:18:25 +0000 (11:18 +0100)]
popupMenu: Only connect to notify::key-focus when needed

PopupMenuManager was connecting to notify::key-focus on the stage on
construction, but only ever reacting to it when one of its menus was
open. Given that every single app icon and text entry creates a
PopupMenuManager this was causing a lot of these handlers to be created.
Every single handler meant calling into JS code only for the vast
majority of them to determine that they would not do anything.

Additionally these handlers were leaked for the whole lifetime of the
stage due to never getting disconnected.

This now only connects the handler when a menu is open and disconnects
again when it is closed, significantly reducing the number of active
handlers at a time.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7143
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3001>

3 years agoshell/screenshot: Use MtkRegion
Robert Mader [Fri, 3 Nov 2023 15:20:24 +0000 (16:20 +0100)]
shell/screenshot: Use MtkRegion

Remove the last user of cairo_region_t in favor of MtkRegion, fixing a
build warning.

3 years agoconfig: Add missing semicolon
Florian Müllner [Thu, 2 Nov 2023 16:50:04 +0000 (17:50 +0100)]
config: Add missing semicolon

The .in file isn't valid javascript, so it's excluded from eslint
and style issues like this can slip through.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3005>

3 years agoRevert "shell/window-tracker: Exclude screen recorder window"
Sebastian Keller [Mon, 30 Oct 2023 11:54:21 +0000 (12:54 +0100)]
Revert "shell/window-tracker: Exclude screen recorder window"

This reverts commit 575ba13b9b4efa40f07d57d87d50d8f0466f2e16.

That commit did not actually prevent the "Unknown" application from
showing up in the dash or app switcher when the recorder was running,
but it introduced a problem with Proton which also uses gstreamer OpenGL
elements in its transcoder. This was causing the overview to get stuck
while the transcoder was running due to the app for the
"OpenGL Renderer" window being null.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7042
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3000>

3 years agost: Use correct type for CoglTexture
Bilal Elmoussaoui [Tue, 19 Sep 2023 19:09:01 +0000 (21:09 +0200)]
st: Use correct type for CoglTexture

No idea how come CoglPipeline was used here but the fact that everything
was a CoglHandle, made things just work despite being wrong?

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2964>

3 years agost: Adapt to CoglObject removal
Bilal Elmoussaoui [Tue, 19 Sep 2023 18:31:56 +0000 (20:31 +0200)]
st: Adapt to CoglObject removal

Also use more memory management macro helpers

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2964>

3 years agoUpdate Portuguese translation
Hugo Carvalho [Thu, 26 Oct 2023 22:09:31 +0000 (22:09 +0000)]
Update Portuguese translation

(cherry picked from commit 92780927cdb07f37d2d41f70cabe6152b92ce214)

3 years agost: Stop using Clutter cairo helpers
Bilal Elmoussaoui [Tue, 18 Jul 2023 13:50:48 +0000 (15:50 +0200)]
st: Stop using Clutter cairo helpers

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2808>

3 years agoui/environment: Add a setSourceColor helper
Bilal Elmoussaoui [Tue, 18 Jul 2023 13:51:25 +0000 (15:51 +0200)]
ui/environment: Add a setSourceColor helper

To simplify porting away from Clutter cairo helpers

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2808>

3 years agoAdapt to Clutter -> Cogl pixel format
Bilal Elmoussaoui [Tue, 18 Jul 2023 13:48:44 +0000 (15:48 +0200)]
Adapt to Clutter -> Cogl pixel format

As the pixel format made more sense to be part of CoglPixelFormat and
was moved there

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2808>

3 years agoshell-app: Make recent all app windows on the target workspace
Sebastian Wick [Mon, 9 Oct 2023 22:13:40 +0000 (00:13 +0200)]
shell-app: Make recent all app windows on the target workspace

meta_window_raise_and_make_recent_on_workspace now works on a target
workspace instead of the active workspace. We call this before another
workspace is made active so the previous behavior made the window the
MRU window on the wrong workspace. If an app got activated and one
window closed, the stacking and focus diverged.

Related: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3315
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2991>

3 years agoUpdate Serbian translation
Марко Костић [Tue, 24 Oct 2023 04:04:29 +0000 (04:04 +0000)]
Update Serbian translation

(cherry picked from commit acf5593bf86fc7c9ca015bada2535978c3007b13)

3 years agocalendar: Emit selected-date-changed before rebuilding the calendar
Sebastian Keller [Sun, 22 Oct 2023 23:06:59 +0000 (01:06 +0200)]
calendar: Emit selected-date-changed before rebuilding the calendar

If the cursor was placed on one of the widgets that get removed when
rebuilding the calendar due to a month change, destroying the hovered
widget will trigger a repick. This repick can then trigger an allocation
while not all buttons of the calendar are present.

If the last allocation before selected-date-changed is emitted was from
such an incomplete state, DateMenuButton will still freeze the layout in
this state in its signal handler.

What freezing the layout in DateMenuButton is supposed to do is to
prevent size changes of the menu when changing days, but for this the
layout needs to be frozen before potentially rebuilding calendar. This
change ensures that by emitting the signal earlier.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5411
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5469
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2989>

3 years agoUpdate Russian translation
Artur S0 [Sun, 22 Oct 2023 16:04:07 +0000 (16:04 +0000)]
Update Russian translation

3 years agodash: Update comment
Alessandro Bono [Sun, 15 Jan 2023 13:38:57 +0000 (14:38 +0100)]
dash: Update comment

The dash is at the bottom of the overview now.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2988>